﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ObservableCollectionProject
{
    public class MainViewModel : ObservableObject
    {
        private Person person;
        public Person Person
        {
            get { return person; }
            set { person = value; RaisePropertyChanged(); }
        }

        public ObservableCollection<Person> Persons { get; set; } = new ObservableCollection<Person>();

        public MainViewModel()
        {
            Person = new Person()
            {
                Name = "yuang",
                Age = 4,
                Address = "重庆",
                Money = 1,
            };
        }
    }
}
